function TbPartnerIncome(params){ 
	 
}

TbPartnerIncome.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new TbPartnerIncome.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new TbPartnerIncome.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new TbPartnerIncome.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	
	
	/** 编号 [非空]       **/
	this.tbpiId=function(tbpiId){if(this.proxy)return this.getProxy().tbpiId(tbpiId);  this.put("tbpiId", tbpiId);return this;};
	/** and tbpi_id is null */
	this.tbpiIdNull=function(){if(this.proxy)return this.getProxy().tbpiIdNull();if(this.get("tbpiIdNot")==null)this.put("tbpiIdNot", "");this.put("tbpiId", null);return this;};
	/** not .... */
	this.tbpiIdNot=function(){if(this.proxy)return this.getProxy().tbpiIdNot();this.put("tbpiIdNot", "not");return this;};
	this.tbpiIdNotNull=function(){if(this.proxy)return this.getProxy().tbpiIdNotNull();this.put("tbpiIdNot", "not");this.put("tbpiId", null);return this;};
	this.tbpiIdNot=function(tbpiId){if(this.proxy)return this.getProxy().tbpiIdNot(tbpiId);this.put("tbpiIdNot", "not");this.put("tbpiId", tbpiId);return this;};
		
	/** and tbpi_id <= ? */
	this.tbpiIdMin=function(min){if(this.proxy)return this.getProxy().tbpiIdMin(min);this.put("tbpiIdMin", min);return this;};
	/** and tbpi_id >= ? */
	this.tbpiIdMax=function(max){if(this.proxy)return this.getProxy().tbpiIdMax(max);this.put("tbpiIdMax", max);return this;};
		
		
	this.tbpiIdIn=function(ids){
		if(this.proxy)return this.getProxy().tbpiIdIn(ids);  this.put("tbpiIdIn", ids);return this;
	};	
		 
	
	
	/** 品牌  [Merchant]      **/
	this.tbpiBrand=function(tbpiBrand){if(this.proxy)return this.getProxy().tbpiBrand(tbpiBrand);  this.put("tbpiBrand", tbpiBrand);return this;};
	/** and tbpi_brand is null */
	this.tbpiBrandNull=function(){if(this.proxy)return this.getProxy().tbpiBrandNull();if(this.get("tbpiBrandNot")==null)this.put("tbpiBrandNot", "");this.put("tbpiBrand", null);return this;};
	/** not .... */
	this.tbpiBrandNot=function(){if(this.proxy)return this.getProxy().tbpiBrandNot();this.put("tbpiBrandNot", "not");return this;};
	this.tbpiBrandNotNull=function(){if(this.proxy)return this.getProxy().tbpiBrandNotNull();this.put("tbpiBrandNot", "not");this.put("tbpiBrand", null);return this;};
	this.tbpiBrandNot=function(tbpiBrand){if(this.proxy)return this.getProxy().tbpiBrandNot(tbpiBrand);this.put("tbpiBrandNot", "not");this.put("tbpiBrand", tbpiBrand);return this;};
		
		
	this.tbpiBrandIn=function(ids){
		if(this.proxy)return this.getProxy().tbpiBrandIn(ids);  this.put("tbpiBrandIn", ids);return this;
	};	
		 
	
	
	/** 会员名称        **/
	this.nickName=function(nickName){if(this.proxy)return this.getProxy().nickName(nickName);  this.put("nickName", nickName);return this;};
	/** and nick_name is null */
	this.nickNameNull=function(){if(this.proxy)return this.getProxy().nickNameNull();if(this.get("nickNameNot")==null)this.put("nickNameNot", "");this.put("nickName", null);return this;};
	/** not .... */
	this.nickNameNot=function(){if(this.proxy)return this.getProxy().nickNameNot();this.put("nickNameNot", "not");return this;};
	this.nickNameNotNull=function(){if(this.proxy)return this.getProxy().nickNameNotNull();this.put("nickNameNot", "not");this.put("nickName", null);return this;};
	this.nickNameNot=function(nickName){if(this.proxy)return this.getProxy().nickNameNot(nickName);this.put("nickNameNot", "not");this.put("nickName", nickName);return this;};
		
		 
	
	
	/** 会员  [Member]      **/
	this.tbpiMember=function(tbpiMember){if(this.proxy)return this.getProxy().tbpiMember(tbpiMember);  this.put("tbpiMember", tbpiMember);return this;};
	/** and tbpi_member is null */
	this.tbpiMemberNull=function(){if(this.proxy)return this.getProxy().tbpiMemberNull();if(this.get("tbpiMemberNot")==null)this.put("tbpiMemberNot", "");this.put("tbpiMember", null);return this;};
	/** not .... */
	this.tbpiMemberNot=function(){if(this.proxy)return this.getProxy().tbpiMemberNot();this.put("tbpiMemberNot", "not");return this;};
	this.tbpiMemberNotNull=function(){if(this.proxy)return this.getProxy().tbpiMemberNotNull();this.put("tbpiMemberNot", "not");this.put("tbpiMember", null);return this;};
	this.tbpiMemberNot=function(tbpiMember){if(this.proxy)return this.getProxy().tbpiMemberNot(tbpiMember);this.put("tbpiMemberNot", "not");this.put("tbpiMember", tbpiMember);return this;};
		
		
	this.tbpiMemberIn=function(ids){
		if(this.proxy)return this.getProxy().tbpiMemberIn(ids);  this.put("tbpiMemberIn", ids);return this;
	};	
		 
	
	
	/** 订单号        **/
	this.tbpiOrderNo=function(tbpiOrderNo){if(this.proxy)return this.getProxy().tbpiOrderNo(tbpiOrderNo);  this.put("tbpiOrderNo", tbpiOrderNo);return this;};
	/** and tbpi_order_no is null */
	this.tbpiOrderNoNull=function(){if(this.proxy)return this.getProxy().tbpiOrderNoNull();if(this.get("tbpiOrderNoNot")==null)this.put("tbpiOrderNoNot", "");this.put("tbpiOrderNo", null);return this;};
	/** not .... */
	this.tbpiOrderNoNot=function(){if(this.proxy)return this.getProxy().tbpiOrderNoNot();this.put("tbpiOrderNoNot", "not");return this;};
	this.tbpiOrderNoNotNull=function(){if(this.proxy)return this.getProxy().tbpiOrderNoNotNull();this.put("tbpiOrderNoNot", "not");this.put("tbpiOrderNo", null);return this;};
	this.tbpiOrderNoNot=function(tbpiOrderNo){if(this.proxy)return this.getProxy().tbpiOrderNoNot(tbpiOrderNo);this.put("tbpiOrderNoNot", "not");this.put("tbpiOrderNo", tbpiOrderNo);return this;};
		
		 
	
	
	/** 订单类型    1:直接购买 2:余额提货订单     **/
	this.tbpiOrderType=function(tbpiOrderType){if(this.proxy)return this.getProxy().tbpiOrderType(tbpiOrderType);  this.put("tbpiOrderType", tbpiOrderType);return this;};
	/** and tbpi_order_type is null */
	this.tbpiOrderTypeNull=function(){if(this.proxy)return this.getProxy().tbpiOrderTypeNull();if(this.get("tbpiOrderTypeNot")==null)this.put("tbpiOrderTypeNot", "");this.put("tbpiOrderType", null);return this;};
	/** not .... */
	this.tbpiOrderTypeNot=function(){if(this.proxy)return this.getProxy().tbpiOrderTypeNot();this.put("tbpiOrderTypeNot", "not");return this;};
	this.tbpiOrderTypeNotNull=function(){if(this.proxy)return this.getProxy().tbpiOrderTypeNotNull();this.put("tbpiOrderTypeNot", "not");this.put("tbpiOrderType", null);return this;};
	this.tbpiOrderTypeNot=function(tbpiOrderType){if(this.proxy)return this.getProxy().tbpiOrderTypeNot(tbpiOrderType);this.put("tbpiOrderTypeNot", "not");this.put("tbpiOrderType", tbpiOrderType);return this;};
		
		
	this.tbpiOrderTypeIn=function(ids){
		if(this.proxy)return this.getProxy().tbpiOrderTypeIn(ids);  this.put("tbpiOrderTypeIn", ids);return this;
	};	
		 
	
	
	/** 合伙人昵称        **/
	this.tbpiPartnerNickname=function(tbpiPartnerNickname){if(this.proxy)return this.getProxy().tbpiPartnerNickname(tbpiPartnerNickname);  this.put("tbpiPartnerNickname", tbpiPartnerNickname);return this;};
	/** and tbpi_partner_nickname is null */
	this.tbpiPartnerNicknameNull=function(){if(this.proxy)return this.getProxy().tbpiPartnerNicknameNull();if(this.get("tbpiPartnerNicknameNot")==null)this.put("tbpiPartnerNicknameNot", "");this.put("tbpiPartnerNickname", null);return this;};
	/** not .... */
	this.tbpiPartnerNicknameNot=function(){if(this.proxy)return this.getProxy().tbpiPartnerNicknameNot();this.put("tbpiPartnerNicknameNot", "not");return this;};
	this.tbpiPartnerNicknameNotNull=function(){if(this.proxy)return this.getProxy().tbpiPartnerNicknameNotNull();this.put("tbpiPartnerNicknameNot", "not");this.put("tbpiPartnerNickname", null);return this;};
	this.tbpiPartnerNicknameNot=function(tbpiPartnerNickname){if(this.proxy)return this.getProxy().tbpiPartnerNicknameNot(tbpiPartnerNickname);this.put("tbpiPartnerNicknameNot", "not");this.put("tbpiPartnerNickname", tbpiPartnerNickname);return this;};
		
		 
	
	
	/** 下单人头像        **/
	this.tbpiHead=function(tbpiHead){if(this.proxy)return this.getProxy().tbpiHead(tbpiHead);  this.put("tbpiHead", tbpiHead);return this;};
	/** and tbpi_head is null */
	this.tbpiHeadNull=function(){if(this.proxy)return this.getProxy().tbpiHeadNull();if(this.get("tbpiHeadNot")==null)this.put("tbpiHeadNot", "");this.put("tbpiHead", null);return this;};
	/** not .... */
	this.tbpiHeadNot=function(){if(this.proxy)return this.getProxy().tbpiHeadNot();this.put("tbpiHeadNot", "not");return this;};
	this.tbpiHeadNotNull=function(){if(this.proxy)return this.getProxy().tbpiHeadNotNull();this.put("tbpiHeadNot", "not");this.put("tbpiHead", null);return this;};
	this.tbpiHeadNot=function(tbpiHead){if(this.proxy)return this.getProxy().tbpiHeadNot(tbpiHead);this.put("tbpiHeadNot", "not");this.put("tbpiHead", tbpiHead);return this;};
		
		 
	
	
	/** 下单人昵称        **/
	this.tbpiNickname=function(tbpiNickname){if(this.proxy)return this.getProxy().tbpiNickname(tbpiNickname);  this.put("tbpiNickname", tbpiNickname);return this;};
	/** and tbpi_nickname is null */
	this.tbpiNicknameNull=function(){if(this.proxy)return this.getProxy().tbpiNicknameNull();if(this.get("tbpiNicknameNot")==null)this.put("tbpiNicknameNot", "");this.put("tbpiNickname", null);return this;};
	/** not .... */
	this.tbpiNicknameNot=function(){if(this.proxy)return this.getProxy().tbpiNicknameNot();this.put("tbpiNicknameNot", "not");return this;};
	this.tbpiNicknameNotNull=function(){if(this.proxy)return this.getProxy().tbpiNicknameNotNull();this.put("tbpiNicknameNot", "not");this.put("tbpiNickname", null);return this;};
	this.tbpiNicknameNot=function(tbpiNickname){if(this.proxy)return this.getProxy().tbpiNicknameNot(tbpiNickname);this.put("tbpiNicknameNot", "not");this.put("tbpiNickname", tbpiNickname);return this;};
		
		 
	
	
	/** 街道        **/
	this.tbpiStreet=function(tbpiStreet){if(this.proxy)return this.getProxy().tbpiStreet(tbpiStreet);  this.put("tbpiStreet", tbpiStreet);return this;};
	/** and tbpi_street is null */
	this.tbpiStreetNull=function(){if(this.proxy)return this.getProxy().tbpiStreetNull();if(this.get("tbpiStreetNot")==null)this.put("tbpiStreetNot", "");this.put("tbpiStreet", null);return this;};
	/** not .... */
	this.tbpiStreetNot=function(){if(this.proxy)return this.getProxy().tbpiStreetNot();this.put("tbpiStreetNot", "not");return this;};
	this.tbpiStreetNotNull=function(){if(this.proxy)return this.getProxy().tbpiStreetNotNull();this.put("tbpiStreetNot", "not");this.put("tbpiStreet", null);return this;};
	this.tbpiStreetNot=function(tbpiStreet){if(this.proxy)return this.getProxy().tbpiStreetNot(tbpiStreet);this.put("tbpiStreetNot", "not");this.put("tbpiStreet", tbpiStreet);return this;};
		
		 
	
	
	/** 省市区        **/
	this.tbpiCity=function(tbpiCity){if(this.proxy)return this.getProxy().tbpiCity(tbpiCity);  this.put("tbpiCity", tbpiCity);return this;};
	/** and tbpi_city is null */
	this.tbpiCityNull=function(){if(this.proxy)return this.getProxy().tbpiCityNull();if(this.get("tbpiCityNot")==null)this.put("tbpiCityNot", "");this.put("tbpiCity", null);return this;};
	/** not .... */
	this.tbpiCityNot=function(){if(this.proxy)return this.getProxy().tbpiCityNot();this.put("tbpiCityNot", "not");return this;};
	this.tbpiCityNotNull=function(){if(this.proxy)return this.getProxy().tbpiCityNotNull();this.put("tbpiCityNot", "not");this.put("tbpiCity", null);return this;};
	this.tbpiCityNot=function(tbpiCity){if(this.proxy)return this.getProxy().tbpiCityNot(tbpiCity);this.put("tbpiCityNot", "not");this.put("tbpiCity", tbpiCity);return this;};
		
		 
	
	
	/** 下单时间        **/
	this.tbpiOrderTime=function(tbpiOrderTime){if(this.proxy)return this.getProxy().tbpiOrderTime(tbpiOrderTime);  this.put("tbpiOrderTime", tbpiOrderTime);return this;};
	/** and tbpi_order_time is null */
	this.tbpiOrderTimeNull=function(){if(this.proxy)return this.getProxy().tbpiOrderTimeNull();if(this.get("tbpiOrderTimeNot")==null)this.put("tbpiOrderTimeNot", "");this.put("tbpiOrderTime", null);return this;};
	/** not .... */
	this.tbpiOrderTimeNot=function(){if(this.proxy)return this.getProxy().tbpiOrderTimeNot();this.put("tbpiOrderTimeNot", "not");return this;};
	this.tbpiOrderTimeNotNull=function(){if(this.proxy)return this.getProxy().tbpiOrderTimeNotNull();this.put("tbpiOrderTimeNot", "not");this.put("tbpiOrderTime", null);return this;};
	this.tbpiOrderTimeNot=function(tbpiOrderTime){if(this.proxy)return this.getProxy().tbpiOrderTimeNot(tbpiOrderTime);this.put("tbpiOrderTimeNot", "not");this.put("tbpiOrderTime", tbpiOrderTime);return this;};
		
	/** and tbpi_order_time >= ? */
	this.tbpiOrderTimeStart=function(start){if(this.proxy)return this.getProxy().tbpiOrderTimeStart(start);this.put("tbpiOrderTimeStart", start);return this;};			
	/** and tbpi_order_time <= ? */
	this.tbpiOrderTimeEnd=function(end){if(this.proxy)return this.getProxy().tbpiOrderTimeEnd(end);this.put("tbpiOrderTimeEnd", end);return this;};
		
		 
	
	
	/** 收益金额        **/
	this.tbpiMoney=function(tbpiMoney){if(this.proxy)return this.getProxy().tbpiMoney(tbpiMoney);  this.put("tbpiMoney", tbpiMoney);return this;};
	/** and tbpi_money is null */
	this.tbpiMoneyNull=function(){if(this.proxy)return this.getProxy().tbpiMoneyNull();if(this.get("tbpiMoneyNot")==null)this.put("tbpiMoneyNot", "");this.put("tbpiMoney", null);return this;};
	/** not .... */
	this.tbpiMoneyNot=function(){if(this.proxy)return this.getProxy().tbpiMoneyNot();this.put("tbpiMoneyNot", "not");return this;};
	this.tbpiMoneyNotNull=function(){if(this.proxy)return this.getProxy().tbpiMoneyNotNull();this.put("tbpiMoneyNot", "not");this.put("tbpiMoney", null);return this;};
	this.tbpiMoneyNot=function(tbpiMoney){if(this.proxy)return this.getProxy().tbpiMoneyNot(tbpiMoney);this.put("tbpiMoneyNot", "not");this.put("tbpiMoney", tbpiMoney);return this;};
		
	/** and tbpi_money <= ? */
	this.tbpiMoneyMin=function(min){if(this.proxy)return this.getProxy().tbpiMoneyMin(min);this.put("tbpiMoneyMin", min);return this;};
	/** and tbpi_money >= ? */
	this.tbpiMoneyMax=function(max){if(this.proxy)return this.getProxy().tbpiMoneyMax(max);this.put("tbpiMoneyMax", max);return this;};
		
		 
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有合伙人收益 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/partner/income.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取合伙人收益分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/partner/income.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取合伙人收益 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/partner/income.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

TbPartnerIncome.get = function(id){
	var protocol = ux.ajax("/admin/partner/income.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.tbPartnerIncome;
	return null;
}

TbPartnerIncome.where = new TbPartnerIncome.Where(0,true);